package util;

public class Sensor {
	
	private Integer id;
	private String description;
	private Boolean state; //[ON (true) |OFF (false)]
	private MeasurementLog measurementLog;

	public Sensor()
	{
		
	}
	public Sensor (int id, String description, boolean state)
	{
		this.id = id;
		this.description = description;
		this.state = state;
	}
	/*public Sensor(int id)
	{
		this.id = id;
		switch(id)
		{
			case 0: this.description = "Noise Level";
				break;
			case 1: this.description = "CO2";
				break;
			case 2: this.description = "Temperature";
				break;
			case 3: this.description = "Humidity";
				break;
			case 4: this.description = "Ozone";
		}
		state = false;
		measurementLog = new MeasurementLog();
	}*/
	
	public void ActivateSensor()
	{
		state = true;
	}
	public void DeactivateSensor()
	{
		state = false;
	}

	public Integer getId() {
		return id;
	}

	public String getDescription() {
		return description;
	}

	public boolean getState() {
		return state;
	}

	public String getMeasurementLog() {
		return measurementLog.showMeasurementLog();
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public void setState(Boolean state) {
		this.state = state;
	}
	public void setMeasurementLog(MeasurementLog measurementLog) {
		this.measurementLog = measurementLog;
	}
	
}
